package com.atguigu.day05.HomeWork;

/**
 * @version 1.0
 * @Author 马冰
 * @Date 2024/11/4 18:59
 * @注释 正序和逆序输出26个英文字母
 */
public class HomeWork3 {
    public static void main(String[] args) {
        char[] arr = new char[26];
        int a = 0;
        //正序
        System.out.println("小写字母的正向排序");
        for(char c = 'a'; c <= 'z'; c++){
            arr[a] = c;
            a++;
            System.out.print(c + " ");
            if(a % 10 == 0){
                System.out.println();
            }
        }
        System.out.println();
        //逆序
        int b = 0;
        System.out.println("小写字母的逆向排序");
        for(char c = 'z'; c >= 'a'; c--){
            arr[b] = c;
            b++;
            System.out.print(c + " ");
            if(b % 10 == 0){
                System.out.println();
            }
        }


    }
}
